package com.aistar.common;

import java.util.Map;

/**
 * 该类封装service层的结果数据给上一层
 */
public class ResponseData {
    private int code;                //返回代码
    private String message;          //消息提示
    private Map<String,Object> data;             //返回数据

    public ResponseData(){}
    public ResponseData(int code, String message, Map<String, Object> data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Map<String, Object> getData() {
        return data;
    }

    public void setData(Map<String, Object> data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "ResponseData{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", data=" + data +
                '}';
    }
}
